<template>
	<view>
		
		<view class="cflex-c-c">
			<text style="position: fixed;top: 150rpx;text-align: center;width: 95%;font-size: 36rpx;">请输入本人银行卡信息</text>
		</view>
		
		<view style="margin:300rpx 20rpx 0 20rpx;padding: 10rpx 10rpx;border-radius: 15rpx;background-color: #FFFFFF;">
			<input  v-model="bankInput" type="text" placeholder="请输入银行名称" style="padding-left:20rpx; margin:30rpx 0;" />
		</view>
		<view style="margin:30rpx 20rpx 0 20rpx;padding: 10rpx 10rpx;border-radius: 15rpx;background-color: #FFFFFF;">
			<input  v-model="cardInput" type="number" placeholder="请输入银行卡号" style="padding-left:20rpx; margin:30rpx 0;" />
		</view>
		
		<view class="cflex-c-c">
			<view style="background-color: #2869FE;border-radius: 15rpx;width: 95%;padding: 20rpx 0;font-weight: bold;text-align: center;margin-top: 30rpx;" @tap="addBank()">保存</view>
		</view>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				bankInput:'',
				cardInput:'',
			}
		},
		onShow() {
			
		},
		onLoad() {
			
		},
		methods: {
			addBank(){
				if(!this.bankInput || !this.cardInput){
					uni.showToast({
						title: '银行信息或卡号不能为空',
						icon:'none'
					});
				}else {
					this.$request("worker/bankCard/addBankCard",{code:this.cardInput,banrName:this.bankInput}).then(res=>{
						console.log(res);
					})
					uni.navigateBack({
						delta:1
					})
				}
			}
		}
	}
</script>

<style>

</style>
